package priv.xp.androidexample.model

import com.github.kittinunf.fuel.core.ResponseDeserializable
import com.google.gson.Gson
import java.util.*

data class Gank(
    val error: Boolean,
    val results: List<Girl>
)

data class Girl(
    val _id: String,
    val createdAt: String,
    val desc: String,
    val publishedAt: Date,
    val source: String,
    val type: String,
    val url: String,
    val used: Boolean,
    val who: String
)

object GankDeserializer : ResponseDeserializable<Gank> {
    override fun deserialize(content: String) =
        Gson().fromJson<Gank>(content, Gank::class.java)
}